<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<jsp:include page="base/head.jsp"></jsp:include>
		<jsp:include page="base/meta.jsp"></jsp:include>
		<title>Insert title here</title>
		<script type="text/javascript">
			function getData(){
				$.ajax({
						url:"../ajaxdemo/getData",
						type:"POST",
						data: {
							"data" : "我是由前端带到后台的数据！"
						},
						contentType: "application/x-www-form-urlencoded;charset=UTF-8",
						async:true,
						success:function(data){
							alert(data);
						}
					});
			}	
		</script>
	</head>
	<body>
		<button onclick="getData();">点击获取数据</button>
	</body>
</html>